import {createApp} from "vue";
import App from "./App.vue";
import {createPinia} from 'pinia'

import {router} from "@/router";
// 本地SVG图标
import "virtual:svg-icons-register";
// 样式
import "uno.css";
import '@/utils/permission'
import '@/assets/css/index.scss'
import resetStore from "@/utils/reset-store";
import {setupDirective} from "@/utils/directive";
import {hasPerm, hasRole} from "@/utils/directive/permission";

const app = createApp(App);
// 注册全局组件
// setupComponents(app)
// 注册v-指令
setupDirective(app)
const pinia = createPinia()
pinia.use(resetStore)
// 自定义指令 v-perm=['sys:user:add']
app.directive('perm',hasPerm)
app.directive('role',hasRole)
app.use(pinia)
    .use(router)
    .mount("#app");
